/**
 * Created by win7 on 2017/3/15.
 */
import Relay from "react-relay";

export default class ReplyDetailMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation {getReplyList }`;
    }

    getVariables() {
        return {
            argsInput: {
                suggestId: this.props.suggestId,
                pageNum: this.props.pageNum,
                pageSize: this.props.pageSize
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getReplyListPayload {
            getReplyList {
                errorCode
                value
                totalResult
                id
                replyModelList{
                    createDate
                    detail
                    userName
                    rid
                    phone
                    headUrl
                    label
                }
            }
        }`;
    }


    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on getReplyListPayload {
            getReplyList {
                        errorCode
                        value
                        totalResult
                        id
                        replyModelList{
                            createDate
                            detail   
                            userName
                            rid
                            phone
                            headUrl
                            label
                        }
                    }
                }
            `]
        }];
    }

}